﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace JobBack.Models
{
    public class UTPrincipal : System.Security.Principal.IPrincipal
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="ticket"></param>
        public UTPrincipal(FormsAuthenticationTicket ticket)
        {
            Identity = new UTIdentity(ticket);
        }
        /// <summary>
        /// 身份信息
        /// </summary>
        public UTIdentity Identity
        {
            get;
            private set;
        }
        /// <summary>
        /// 返回身份信息
        /// </summary>
        System.Security.Principal.IIdentity System.Security.Principal.IPrincipal.Identity
        {
            get { return Identity; }
        }

        public bool IsInRole(string role)
        {
            throw new NotImplementedException();
        }
    }
}